package org.supda.system.entity;

import static javax.persistence.GenerationType.IDENTITY;

import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * TServerWarnProperties entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "t_server_warn_properties", catalog = "comsys")
public class TServerWarnProperties implements java.io.Serializable {

	// Fields

	private Long id;
	private TRole TRole;//角色
	private Integer cpuWarn;//cpu报警值
	private Integer memoryWarn;
	private Integer diskWarn;
	private Integer swarpWarn;//swap报警值，对应windows中的虚拟内存
	private Integer jvmWarn;
	private Short checkTimes;//硬件信息check次数--->平均值
	private Short checkbytimeSpace;//未无效，默认一秒
	private Short checkActualtimeSpace;//未生效，默认一秒
	private Timestamp createTime;//创建时间

	// Constructors

	/** default constructor */
	public TServerWarnProperties() {
	}

	/** full constructor */
	public TServerWarnProperties(Long id, TRole TRole, Integer cpuWarn,
			Integer memoryWarn, Integer diskWarn, Integer swarpWarn,
			Integer jvmWarn, Short checkTimes, Short checkbytimeSpace,
			Short checkActualtimeSpace, Timestamp createTime) {
		this.id = id;
		this.TRole = TRole;
		this.cpuWarn = cpuWarn;
		this.memoryWarn = memoryWarn;
		this.diskWarn = diskWarn;
		this.swarpWarn = swarpWarn;
		this.jvmWarn = jvmWarn;
		this.checkTimes = checkTimes;
		this.checkbytimeSpace = checkbytimeSpace;
		this.checkActualtimeSpace = checkActualtimeSpace;
		this.createTime = createTime;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "role_id", nullable = false)
	public TRole getTRole() {
		return this.TRole;
	}

	public void setTRole(TRole TRole) {
		this.TRole = TRole;
	}

	@Column(name = "cpu_warn", nullable = false)
	public Integer getCpuWarn() {
		return this.cpuWarn;
	}

	public void setCpuWarn(Integer cpuWarn) {
		this.cpuWarn = cpuWarn;
	}

	@Column(name = "memory_warn", nullable = false)
	public Integer getMemoryWarn() {
		return this.memoryWarn;
	}

	public void setMemoryWarn(Integer memoryWarn) {
		this.memoryWarn = memoryWarn;
	}

	@Column(name = "disk_warn", nullable = false)
	public Integer getDiskWarn() {
		return this.diskWarn;
	}

	public void setDiskWarn(Integer diskWarn) {
		this.diskWarn = diskWarn;
	}

	@Column(name = "swarp_warn", nullable = false)
	public Integer getSwarpWarn() {
		return this.swarpWarn;
	}

	public void setSwarpWarn(Integer swarpWarn) {
		this.swarpWarn = swarpWarn;
	}

	@Column(name = "jvm_warn", nullable = false)
	public Integer getJvmWarn() {
		return this.jvmWarn;
	}

	public void setJvmWarn(Integer jvmWarn) {
		this.jvmWarn = jvmWarn;
	}

	@Column(name = "check_times", nullable = false)
	public Short getCheckTimes() {
		return this.checkTimes;
	}

	public void setCheckTimes(Short checkTimes) {
		this.checkTimes = checkTimes;
	}

	@Column(name = "checkbytime_space", nullable = false)
	public Short getCheckbytimeSpace() {
		return this.checkbytimeSpace;
	}

	public void setCheckbytimeSpace(Short checkbytimeSpace) {
		this.checkbytimeSpace = checkbytimeSpace;
	}

	@Column(name = "check_actualtime_space", nullable = false)
	public Short getCheckActualtimeSpace() {
		return this.checkActualtimeSpace;
	}

	public void setCheckActualtimeSpace(Short checkActualtimeSpace) {
		this.checkActualtimeSpace = checkActualtimeSpace;
	}

	@Column(name = "create_time", nullable = false, length = 0)
	public Timestamp getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Timestamp createTime) {
		this.createTime = createTime;
	}

}